<!--
 * @Author: your name
 * @Date: 2020-12-28 10:25:30
 * @LastEditTime: 2020-12-28 10:37:48
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \basiccss\box\fuzhiset.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>负值设置</title>
   
    <style>
        /*给元素设置负值的时候，元素会溢出的*/
        /* main{
            border: solid 1px red;
            width: 300px;
            margin: 0 auto;
        }
        h2{
            border: solid 2px green;
            margin-left: -50px;
            margin-right: -50px;
            text-align: center;
        } */


        /*相邻元素的纵向外边距会进行合并,会取两个元素的内边距比较大的*/
        h2{
            border: 2px solid green;
            margin-bottom: 30px;
        }
        h3{
            border: solid 2px green;
            height: 20px;
            margin-top: 30px;
        }
    </style>
</head>
<body>
    <!-- <main>
        <h2>houdunren.com</h2>
    </main> -->

    <h2>houdunren.com</h2>
    <h2>hdcms.com</h2>
    <h3></h3>

    
</body>
</html>